//
//  WZPBtoomRreshView.m
//  WZPItem
//
//  Created by 王王喆平 on 16/7/20.
//  Copyright © 2016年 UI. All rights reserved.
//

#import "WZPBtoomRreshView.h"

@interface WZPBtoomRreshView ()
@property (weak, nonatomic) IBOutlet UILabel *labeView;
@property (weak, nonatomic) IBOutlet UIImageView *downView;
@property (weak, nonatomic) IBOutlet UIView *uploadView;

@end

@implementation WZPBtoomRreshView

-(void)setIsRreshView:(BOOL)isRreshView{
    _isRreshView = isRreshView;
    _uploadView.hidden = !isRreshView;

}

-(void)setIsVisable:(BOOL)isVisable{

    _isVisable = isVisable;
    _labeView.text = isVisable == NO?@"下拉刷新":@"松开立即刷新";
    [UIView animateWithDuration:0.3 animations:^{
        _downView.transform = isVisable == YES?CGAffineTransformMakeRotation(-M_PI + 0.00001) : CGAffineTransformIdentity;
    }];

}

-(void)awakeFromNib{

    self.autoresizingMask = UIViewAutoresizingNone;

}

+(instancetype)headView{
    
    return [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass(self) owner:nil options:nil] firstObject];
    
}

@end
